﻿using UnityEngine;
using System.Runtime.InteropServices;

public class KeyChain
{

#if UNITY_IPHONE || UNITY_STANDALONE_OSX

    [DllImport("__Internal")]
    private static extern string getKeyChainUser(string _key);

    public static string BindGetKeyChainUser(string _key)
    {
        return getKeyChainUser(_key);
    }

    [DllImport("__Internal")]
    private static extern void setKeyChainUser(string key, string value);

    public static void BindSetKeyChainUser(string key, string value)
    {
        setKeyChainUser(key, value);
    }

    [DllImport("__Internal")]
    private static extern void deleteKeyChainUser(string key);

    public static void BindDeleteKeyChainUser(string key)
    {
        deleteKeyChainUser(key);
    }

#endif
}
